{% extends "myuni/base.html" %}
{% block template %}people{% endblock template %}

{% block content-inner %}

					<div class="main">
					
						<h2>People</h2>

						{% ifequal ordering "by-first-name" %}
							<h3><span>Staff &amp; Students by First Name</span></h3>
						{% else %}
							{% ifequal ordering "by-last-name" %}
							<h3><span>Staff &amp; Students by Last Name</span></h3>
							{% else %}
							<h3><span>Staff &amp; Students by Role</span></h3>
							{% endifequal %}
						{% endifequal %}

						<table>
							<thead>
								<tr>
									<th></th>
									<th>Name</th>
									<th>Roles</th>
									<th>Telephone</th>
									<th>URL</th>
									<th>Email</th>
								</tr>
							</thead>
							<tbody>
								{% for person in people %}
									{% ifnotequal ordering "by-first-name" %}
									{% ifnotequal ordering "by-last-name" %}
									{% ifchanged person.role_description %}
								<tr>
									<th></th>
									<th colspan="5">
										{{ person.role_description }}
									</th>
								</tr>
									{% endifchanged %}
									{% endifnotequal %}
									{% endifnotequal %}
								<tr>
									<td><img src="/media/people/{{person.username}}/30px.gif" width="30px" height="30px" /></td>
									<td>
										<a href="/people/{{person.username}}/">
											{% ifequal ordering "by-last-name" %}
												<span class="name"><strong>{{person.last_name}}</strong>, {{person.first_name}} {{person.initial}}</span>
											{% else %}
												{% ifequal ordering "by-first-name" %}
												<span class="name"><strong>{{person.first_name}}</strong> {{person.initial}} {{person.last_name}}</span>
												{% else %}
												<span class="name">{{person.get_full_name}}</span>
												{% endifequal %}
											{% endifequal %}
										</a>
									</td>
									<td>{% include "myuni/person.snippet.role-description.html" %}</td>
									<td><span class="telephone">{{person.phone}}</span></td>
									<td><a href="http://cs.nott.ac.uk/~{{person.username}}/" class="url">{{person.username}}</a></td>
									<td><a href="mailto:{{person.email}}" class="email">email</a></td>
								</tr>
								{% endfor %}
							</tbody>
						</table>

					</div><!-- /.main -->

					<div class="sidebar">
						<div class="module">
							<div class="module-content">
								<h3 class="module-header">Filter by:</h3>
								<ul class="filter-list">
									<li><a href=""></a></li>
								</ul>
								<div class="filter-group">
									<h3>Role</h3>
									<ul>
										<li><a href="/people/by-role/academic-staff/">Academic Staff</a></li>
										<li><a href="/people/by-role/research-staff/">Research Staff</a></li>
										<li><a href="/people/by-role/administrative-staff/">Administrative Staff</a></li>
										<li><a href="/people/by-role/technical-staff/">Technical Staff</a></li>
									</ul>
								</div>
							</div><!-- /.module-content -->
						</div><!-- /.module -->
						<div class="module">
							<div class="module-content">
								<h3 class="module-header">Sort by:</h3>
								<ul class="navigation-list">
									<li><a href="/people/by-role/">By Role</a></li>
									<li><a href="/people/by-first-name/">By First Name</a></li>
									<li><a href="/people/by-last-name/">By Last Name</a></li>
								</ul>
							</div><!-- /.module-content -->
						</div><!-- /.module -->
					</div><!-- /.sidebar -->

{% endblock content-inner %}